package com.eastfair.saga;

import com.eastfair.security.annotation.EnableLoginArgResolver;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import static com.eastfair.constant.BizConstant.UTIL_PACKAGE;

/**
 * SagaBusinessApplication
 *
 * @author dmego
 * @date 2021/3/31 10:48
 */
//@SpringBootApplication(exclude = DruidDataSourceAutoConfigure.class)
@SpringBootApplication()
@EnableDiscoveryClient
@EnableFeignClients({UTIL_PACKAGE})
@ComponentScan({
        UTIL_PACKAGE
})
@Configuration
@EnableLoginArgResolver
public class SagaBusinessApplication {
    public static void main(String[] args) {
        SpringApplication.run(SagaBusinessApplication.class, args);
    }

//    @Bean
//    public GlobalTransactionScanner getGlobalTransactionScanner() {
//        return new GlobalTransactionScanner("saga", "ef_dev_tx_group");
//    }

}
